/*
//交换数组元素，现在有一个整数数组int[] a = {1,3,5,7};
//第一个元素和第三个元素交换
//第二个元素和第四个元素交换

public class Main{

    int[] a;

    public void exchange(){
        int[] arr1 = ex1(this.a);

        int[] arr = ex2(arr1);

        int i;
        for(i = 0; i < arr.length;i++){
            System.out.print(arr[i]+" ");
        }

    }
    public static int[] ex1(int[] arr){
        int tmp = arr[0];
        arr[0] = arr[2];
        arr[2] = tmp;

        return arr;
    }

    public static int[] ex2(int[] arr){
        int tmp = arr[1];
        arr[1] = arr[3];
        arr[3] = tmp;

        return arr;
    }

    public static void main(String[] args){
        Main a = new Main();
        a.a = new int[]{1,3,5,7};

        a.exchange();

    }
}
 */